package app.lemenu;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;


public class LE_MENUActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.lemenu, menu);
        return true;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item)
    {
        // Handle item selection
        switch (item.getItemId())
        {

        	case R.id.item1:
        	{
            	novaTela("Wiki");
            	return true;
        	}

        	case R.id.item2:
        	{
        		novaTela("Chat");
        		return true;
        	}

        
        	default:
        		return false;
        }
    }
    
    
    public void novaTela(String s)
    {
    	Intent myIntent = new Intent(LE_MENUActivity.this,activity2.class);
        myIntent.putExtra("msg",s);
        
        startActivityForResult(myIntent,0);
    }

    
    
}